<div>
	<?php echo $this->Html->link('Pridať', 
					array('controller'=>'articles', 'action'=>'add'),
					array('role'=>'button', 'class'=>'btn btn-success')
				); ?>
</div>

<table class="table table-hover table-striped">
<tr>
	<th>Titulok</th>
	<th>Vytvorené</th>
	<th>Publikovať/dekativovať</th>
	<th>Odstrániť</th>
</tr>


<?php foreach($articles as $article): ?>
<tr>
	<td>
		<?php echo $this->Html->link($article['Article']['title'], 
						array('controller'=>'articles', 'action'=>'view', $article['Article']['id'])
					);
		?>
	</td>
	<td>
		<?php echo $this->Html->link('Editovať',
						array('controller'=>'articles', 'action'=>'edit', $article['Article']['id']),
						array('role'=>'button', 'class'=>'btn btn-info')
					);
		?>
	</td>
	<td>
		<?php echo $this->Form->postLink('Odstrániť',
						array('controller'=>'articles', 'action'=>'delete', $article['Article']['id']),
						array('confirm'=>'Určite motorko?', 'role'=>'button', 'class'=>'btn btn-danger')
					);
		?>
	</td>
	<td>
		<?php echo $article['Article']['created'];?>
	</td>
</tr>
<?php endforeach;?>
</table>